package vip.xiaozhao.paotui.intf.mapper;

import org.apache.ibatis.annotations.*;
import vip.xiaozhao.paotui.intf.entity.PaotuiWalletWithdrawChannel;

@Mapper
public interface PaotuiWalletWithdrawChannelMapper {

    @Select("select * from xzvip_paotui_wallet_withdraw_channel where id=#{id}")
    PaotuiWalletWithdrawChannel loadById(int id);

    @Insert("insert into xzvip_paotui_wallet_withdraw_channel(UserId,RealName,Mobile,ChannelNo,Status,AddTime,UpdateTime)" +
            "values (#{userId},#{realName},#{mobile},#{channelNo},#{status},now(),now())")
    @Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id")
    int insert(PaotuiWalletWithdrawChannel withdrawChannel);

    @Update("update xzvip_paotui_wallet_withdraw_channel set UserId = #{userId},RealName = #{realName}," +
            "Mobile = #{mobile},ChannelNo = #{channelNo},Status = #{status} , UpdateTime = now() where id = #{id} ")
    int update(PaotuiWalletWithdrawChannel withdrawChannel);
}
